<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>login</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css"
			href="<%=request.getContextPath() %>/css/style.css" />
			
		<script type="text/javascript">
			function check(){
			       var name = document.reg.username.value;
			       var pwd = document.reg.password.value;
				   var validatecode = document.reg.validatecode;
			       if(name.length < 6){
			            alert("用户名不能小于6");
			            name.focus();
			            return false;
			       }
			       if(pwd.length<6){
			            alert("密码不能小于6");
			            pwd.focus();
			            return false;
			       }
			       
			       
			       if(validatecode.value==null||validatecode.value==""){
			            alert("验证密码不能为空");
			            validatecode.focus();
			            return false;
			       }
			       return true;
			   }
		</script>
	</head>

	<body>
		<div id="wrap">
			<div id="top_content">
					<div id="header">
						<div id="rightheader">
							<p><br/></p>
						</div>
						<div id="topheader">
							<h1 id="title">
								<a href="#">通讯录</a>
							</h1>
						</div>
						<div id="navigation">
						</div>
					</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1>
						login
					</h1>
					<form action="manage/checkLogin.do" method="post" name="reg">
						<table cellpadding="0" cellspacing="0" border="0"
							class="form_table">
							<tr>
								<td valign="middle" align="right">
									username:
								</td>
								<td valign="middle" align="left">
									<input type="text" class="inputgri" name="username" />
								</td>
							</tr>
							<tr>
								<td valign="middle" align="right">
									password:
								</td>
								<td valign="middle" align="left">
									<input type="password" class="inputgri" name="password" />
								</td>
							</tr>
							
							<tr>
								<td valign="middle" align="right">
									<td>验证码<input type="text" name="validatecode" size="4">
									<img  src="validationCodeServlet.png">
									</td>
								</td>
							</tr>
						</table>
						<p>
							
							<input type="submit" class="button" value=">>登录  &raquo; " onclick="check()" />
						</p>
						<a href="regist.jsp">注册新用户</a>
					</form>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
					ABC@126.com
				</div>
			</div>
		</div>
	</body>
</html>